<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDepartmentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('department', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100)->comment('部门名称');
            $table->string('principal', 100)->default('')->comment('负责人');
            $table->string('tel', 50)->default('')->comment('联系电话');
            $table->string('tel_sub', 50)->default('')->comment('分机号');
            $table->string('email', 100)->default(0)->comment('邮箱');
            $table->tinyInteger('deleted')->default(0);
            $table->integer('created_at')->nullable();
            $table->integer('updated_at')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('department');
    }
}
